<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" href="css/amazeui.min.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/amazeui.min.css" type="text/css" />
		<link rel="stylesheet" href="css/style.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/style.css" type="text/css" />
		<link rel="stylesheet" href="layui/css/layui.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/style.css" type="text/css" />
	</head>
	<body style="background-color: white;">
		<header data-am-widget="header" class="am-header am-header-default jz">
		      <div class="am-header-left am-header-nav">
		         <a href="javascript:history.back()" class="">
					取消
				</a>
		      </div>
		      <div class="am-header-right am-header-nav">
		         <a href="javascript:history.back()" class="">
					发表
				</a>
		      </div>
        </header>
		<textarea placeholder="说点什么吧" style="width: 100%;border:none;outline:none;"></textarea>
		<div class="layui-upload-list" id="demo2">
    		<img src="images/iconfont-tianjia.png" id="test2" style="width: 80px;height: 80px;">
    	</div>
	</body>
	<script type="text/javascript" src="js/jquery.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/amazeui.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/amazeui.min.js"></script>
	<script src="layui/layui.js" charset="utf-8"></script>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
		layui.use('upload', function(){
		  var $ = layui.jquery
		  ,upload = layui.upload;
		  //多图片上传
		  upload.render({
		    elem: '#test2'
		    ,url: 'http://192.168.199.201:8089/file/up'
		    ,multiple: true
		    ,before: function(obj){
		      //预读本地文件示例，不支持ie8
		      obj.preview(function(index, file, result){
		        $('<img src="'+ result +'" alt="'+ file.name +'" style="width:80px;height:80px;margin-left: 10px;,margin-top: 5px;margin-bottom: 5px;" class="layui-upload-img">').prependTo($('#demo2'))
		      });
		    }
		    ,done: function(res){
		      //上传完毕
		    }
		  });
		});
	</script>
</html>
